Skip to main content

Binary Even and Hexadecimal Odd

You will solve the exercise starting from the file odd_even.c located in the directory drills/tasks/odd-even/.

Traverse an array of 32-bit integers using pointer operations and display the even numbers in binary and the odd numbers in hexadecimal.

NOTE: Use bitwise operations wherever possible in your solution!

NOTE: For the array [214, 71, 84, 134, 86], the program will display:

0b11010110
0x00000047
0b01010100
0b10000110
0b01010110

If you're having difficulties solving this exercise, go through this reading material.